<?php
class Contact
{
    /**
     * @desc : permet de supprimer un contact
     * @param id : identifiant du contact
     * **/
    function Delete($id)
    {
        global $Session, $db,$template;
        if($Session->check_admin())
        {
            $db->sql_query("DELETE FROM immo_contact WHERE id = '". $id ."'");
            $db->sql_query("DELETE FROM immo_contact_reply WHERE contact = '". $id ."'");
            $template->assign_vars(array(
            'ERROR_MSG'	=> true,
            'ERRORH_CLASS'	=> 'error_success',
            'ERRORH_IMG'	=>	'comment_ok',
            'V_ERROR_TXT'	=>	$lang['Message_supprime']));
        }
        else
            redirect('plugins.php.plugins=Contact');
        
    }
}